﻿using System.Diagnostics.Contracts;
using GIMS.Def.Arguments;

namespace GIMS.GUI.ArgumentControls
{
    public class AppendArgumentControlViewModel
    {
        public AppendArgumentControlViewModel(AppendArgument appendArgument)
        {
            Contract.Requires(null != appendArgument);
            AppendArgument = appendArgument;
        }

        public AppendArgument AppendArgument
        {
            get;
            private set;
        }

        public bool IsVertical
        {
            get { return AppendArgument.AppendDirection == AppendDirection.vertical; }
            set
            {
                if (value)
                {
                    AppendArgument.AppendDirection = AppendDirection.vertical;
                }
            }
        }

        public bool IsHorizontal
        {
            get { return AppendArgument.AppendDirection == AppendDirection.horizontal; }
            set
            {
                if (value)
                {
                    AppendArgument.AppendDirection = AppendDirection.horizontal;
                }
            }
        }
    }
}

